All Questions
4 questions
3votes
1answer
1kviews
Printing longest lines
Challenge Write a program which reads a file and outputs a specified number of lines, sorted on length in descending order. Specifications The first argument is a path to a file. The file contains ...
2votes
1answer
947views
Sort files by the type of file
I need to sort files by the type of the File. To accomplish the task I first wrote the code below: ...
8votes
2answers
2kviews
Sorting a set of numbers in a file using Java BitSet
I have implemented a program to sort a file consisting of numbers. The program generates a different output file with all numbers sorted in it. I have implemented this program using ...
4votes
1answer
2kviews
Sorting file lines in natural order
I'm new to Java and have been through some tutorials and I'm in the next step of checking how I'm doing now. Is there a better way of doing this? ...